package com.air.designmodel.seven;

import com.air.designmodel.seven.factory.AbstractFactory;
import com.air.designmodel.seven.factory.FactoryProducer;


/**
 * 抽象工厂测试类
 *
 * @author shent
 */
public class AbstractFactoryTest {
    public static void main(String[] args) {
        AbstractFactory shapeFactory = FactoryProducer.getFactory("shape");
        Shape shape1 = shapeFactory.getShape("circle");
        shape1.draw();

        AbstractFactory colorFactory = FactoryProducer.getFactory("color");
        Color color1 = colorFactory.getColor("blue");
        color1.fill();
    }
}
